package com.xyy.saas.payment.cores.enums;

import lombok.Getter;

/**
 * @author liujf
 */
@Getter
public enum XydAccountTypeEnum {
    // 小雨点 预付款专户
    REFUND_SPECIAL(2, "退款专户"),

    // 小雨点 保证金专户
    DISCOUNT_SPECIAL(3, "贴息专户"),
    ;
    private Integer code;

    private String name;

    XydAccountTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getNameByCode(Integer code) {
        if (REFUND_SPECIAL.code.equals(code)) {
            return REFUND_SPECIAL.name;
        } else if (DISCOUNT_SPECIAL.code.equals(code)) {
            return DISCOUNT_SPECIAL.name;
        } else {
            return null;
        }
    }


}
